#ifndef CSUGL_IMAGE_LOADER_H
#define CSUGL_IMAGE_LOADER_H

#include "../core/core.h"

#include <functional>
#include <string>

namespace csugl::il {

    // Meta Image
    struct MImage {
        int width, height, channel;
        static std::function<void(uint8_t *)> data_deleter;
        Scope<uint8_t, decltype(data_deleter)> data;
    };

    class image_loader {
    public:
        bool pre_load(const std::string& fileName, bool flip = true);

        Ref<MImage> load(const std::string &fileName);
    };
}

#endif // !CSUGL_IMAGE_LOADER_H